package jq.entity;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

/**
 * This class is the currency class
 */
@PersistenceCapable
public class Currency {
	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Key key;
	@Persistent
	private String currencyName;
	@Persistent
	private String currencyCode;
	@Persistent
	private Double currencyUsdRate;

	public Currency() {
		super();
	}

	public Currency(String currencyName, String currencyCode, Double currencyUsdRate) {
		super();
		this.currencyName = currencyName;
		this.currencyCode = currencyCode;
		this.currencyUsdRate = currencyUsdRate;
	}

	public Key getKey() {
		return key;
	}

	public void setKey(Key key) {
		this.key = key;
	}

	public String getCurrencyName() {
		return currencyName;
	}

	public void setCurrencyName(String currencyName) {
		this.currencyName = currencyName;
	}

	public String getCurrencyCode() {
		return currencyCode;
	}

	public void setCurrencyCode(String currencyCode) {
		this.currencyCode = currencyCode;
	}

	public Double getCurrencyUsdRate() {
		return currencyUsdRate;
	}

	public void setCurrencyUsdRate(Double currencyUsdRate) {
		this.currencyUsdRate = currencyUsdRate;
	}

	@Override
	public String toString() {
		return this.currencyName+"\t"+this.currencyCode+"\t"+this.currencyUsdRate;
	}
	
}
